<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<link rel="stylesheet" href="https://unpkg.com/swiper@8/swiper-bundle.min.css">
<script src="https://unpkg.com/swiper@8/swiper-bundle.min.js"> </script>

<body>
    <div class="swiper">
        <div class="swiper-wrapper">
            <div class="swiper-slide">Slide 1</div>
            <div class="swiper-slide">Slide 2</div>
            <div class="swiper-slide">Slide 3</div>
        </div>
    </div>
</body>
<script>
    var mySwiper = new Swiper('.swiper', {
        loop: true, // 循环模式选项
    })
</script>
<style>
    html,
    body {
        width: 100%;
        height: 100%;
        margin: 0;
    }

    div {
        user-select: none;
    }

    .swiper {
        width: 50%;
        height: 300px;
    }

    .swiper-slide{
        background-color: blue;
    }
</style>

</html>